﻿using System;
using System.Threading;
using System.Threading.Tasks;

namespace NetSync.Core
{
    public interface INetSync<TRequest, TResponse> : IDisposable where TRequest : class, new() where TResponse : class, new()
    {
        INetConnection NetConnection {  get; }

        Task<TResponse1> SendReplyAsync<TResponse1>(string topic, object request, int timeoutSecond = 120, CancellationToken token = default) where TResponse1 : TResponse, new();
    }
}
